﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace GH.Web.UionReport
{
    public partial class DemocraticManagement : BasePage.PageBase
    {
        public static string UnitRoot = System.Configuration.ConfigurationSettings.AppSettings["UnitRoot"];
        //单位名称
        public string mstrUnionName = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            GH.BLL.Union bllUnion = new GH.BLL.Union();
            if (!this.IsPostBack)
            {
                hddSumarry.Value = "0";
                this.Session["UnionSelect"] = this.Session["Union"].ToString();



                //报表汇总
                if (GetRight(301))
                {
                    hddRights.Value = "1";

                }
                else
                {
                    hddRights.Value = "0";
                }
                //报表查看
                if (GetRight(302))
                {
                    hddOpen.Value = "1";

                }
                else
                {
                    hddOpen.Value = "0";
                }
                this.hddAllUnion.Value = UnitRoot;
            }

            //当前日期
            Session["SelectCurrentYear"] = System.DateTime.Now.Year.ToString();

            hddCurrentYear.Value = System.DateTime.Now.Year.ToString();
            lblCurrentYear.Text = System.DateTime.Now.Year.ToString();
            GH.Model.工会单位信息 modUnion = bllUnion.GetModel(int.Parse(this.Session["UnionSelect"].ToString()));
            this.hddUnionID.Value = this.Session["UnionSelect"].ToString();
            lblUnionName.Text = modUnion.单位名称;
            hddCurrentYear.Value = Session["SelectCurrentYear"].ToString();
        }
    }
}
